home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / lu62 / waitfree.asm < prev    next >
Assembly Source File  |  1996-07-10  |  2KB  |  100 lines

  1. ;**********************************************************
  2. ;*                                                        *
  3. ;*                    W A I T S T                         *
  4. ;*                                                        *
  5. ;*     Function: Put a processor in the halt state till   *
  6. ;*               the first APPC request comes.            *
  7. ;*                                                        *
  8. ;*                                                        *
  9. ;* CopyRight 1995. Nicholas Poljakov all rights reserved. *
  10. ;*                                                        *
  11. ;**********************************************************
  12. ;
  13. .MODEL large
  14. .CODE
  15.  PUBLIC _waitst, _lupost
  16. _waitst PROC
  17.      jmp wst
  18. save db  22 dup (?)
  19. _lupost db 0
  20. wst:
  21.      mov  bx, offset save
  22.      mov  cs:[bx], ax
  23.      inc  bx
  24.      inc  bx
  25.      mov  cs:[bx], bx
  26.      inc  bx
  27.      inc  bx
  28.      mov  cs:[bx], cx
  29.      inc  bx
  30.      inc  bx
  31.      mov  cs:[bx], dx
  32.      inc  bx
  33.      inc  bx
  34.      mov  cs:[bx], si
  35.      inc  bx
  36.      inc  bx
  37.      mov  cs:[bx], di
  38.      inc  bx
  39.      inc  bx
  40.      mov  cs:[bx], ds
  41.      inc  bx
  42.      inc  bx
  43.      mov  cs:[bx], es
  44.      inc  bx
  45.      inc  bx
  46.      mov  cs:[bx], ss
  47.      inc  bx
  48.      inc  bx
  49.      mov  cs:[bx], sp
  50.      inc  bx
  51.      inc  bx
  52.      pushf
  53.      pop  cx
  54.      mov  cs:[bx], cx
  55.      mov  _lupost,0
  56. retry:
  57. ;     mov  ah, 11
  58. ;     int  21h
  59.      cmp  _lupost,1
  60.      jne  retry
  61. ;
  62.      mov  bx, offset save
  63.      mov  ax, cs:[bx]
  64.      inc  bx
  65.      inc  bx
  66.      mov  bx, cs:[bx]
  67.      inc  bx
  68.      inc  bx
  69.      mov  cx, cs:[bx]
  70.      inc  bx
  71.      inc  bx
  72.      mov  dx, cs:[bx]
  73.      inc  bx
  74.      inc  bx
  75.      mov  si, cs:[bx]
  76.      inc  bx
  77.      inc  bx
  78.      mov  di, cs:[bx]
  79.      inc  bx
  80.      inc  bx
  81.      mov  ds, cs:[bx]
  82.      inc  bx
  83.      inc  bx
  84.      mov  es, cs:[bx]
  85.      inc  bx
  86.      inc  bx
  87.      mov  ss, cs:[bx]
  88.      inc  bx
  89.      inc  bx
  90.      mov  sp, cs:[bx]
  91.      inc  bx
  92.      inc  bx
  93.      mov  cx, cs:[bx]
  94.      push cx
  95.      popf
  96.      ret
  97. _waitst ENDP
  98.      END
  99.  
  100.